
*Simone: the following lines are (to me) irrelevant here
global option varlabels tex plain fragment bdec() se starloc(1) starlevels(10 5 1) nocenter ///
		summstat(r2\N) summtitle("R^2" \"Observations") summdec(3 0) blankrows ///
		pretext( "\begin{table}[htbp]"  "\begin{adjustbox}{max width=0.7 \textwidth,center}" "\begin{threeparttable}"	) ///
		posttext( "\begin{tablenotes}" "\small{\item \textbf{ Notes} Robust standard errors are in parentheses.  \mbox{$***$ $p<$0.01}, \mbox{$**$ $p<$0.05}, \mbox{$*$ $p<$0.1};  }"  "\end{tablenotes}"   "\end{threeparttable}"    "\end{adjustbox}"  "\end{table}")


		
	

*original dataset from Mobarak 
clear 
use "${source}applicant_final.dta"



do "${code_datapreparation}var_definition.do"


global x = "i.HEIGHT muslim i.feducat i.meducat i.hhsize13 phoneFound"

keep migrated *married* spouse_incLmonth  HEIGHT muslim feducat meducat hhsize13 phoneFound ///
t1 t2 spouse*  wt UNION upazila

*original code from  Mobarak  
replace spouse_incLmonth = 0 if mi(spouse_incLmonth)
replace spouse_educ = 0 if married==0


label var  unmarried13 "Unmarried bef. mig lottery"

gen migUnmarried = migrated * unmarried13
label var migUnmarried  "Migrated * Unmarried before mig"


*CODE ELIE: put as missing spouse education and income when individual is not currently married 
replace  spouse_ed8 =. if married==0
replace spouse_incLmonth =. if   married==0
	

save "${data}Mobarak_replication_data", replace 	

	
	
